package com.allwees.bs.module.ops.service.impl;

import com.allwees.bs.module.base.service.impl.BoServiceImpl;
import com.allwees.bs.module.ops.dao.AppVersionDao;
import com.allwees.bs.module.ops.entity.AppVersion;
import com.allwees.bs.module.ops.req.AppVersionCrudReq;
import com.allwees.bs.module.ops.service.AppVersionService;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;

/**
 *
 *
 * @author yangylsky
 * @since 2019-08-21
 *
 */
@Service
public class AppVersionServiceImpl extends BoServiceImpl<AppVersionDao, AppVersion> implements AppVersionService {


    @Override
    public void save(AppVersionCrudReq req) {
        AppVersion appVersion = req.getBo();
        appVersion.setUuid(null);
        baseMapper.insert(appVersion);
    }

    @Override
    public void update(AppVersionCrudReq req) {
        Assert.hasLength(req.getBo().getUuid(),"uuid 不能为空");
        updateByUuid(req.getBo());
    }
}
